package nullInvader;

import nullInvader.Control.GameControl;

/**
 * This class is responsible for two things. Starting the game by
 * creating a GameControl object and parse any command-line argument
 * sent to the game upon execution.
 * 
 * @author Emanuel Yifter Lindgren ( dv11elr ).
 * @version 1.0
 */
public class NullInvader {

    public static void main(String[] args) {
        /* Check if there's a special map file specified. */
        if (args.length > 0
                && NullInvader.class
                        .getResource("/nullInvader/Resources/"
                                + args[0]) != null) {

            new GameControl(args[0]);
        } else {
            /* if no valid file was specified send null. */
            new GameControl(null);
        }

    }

}
